home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-08-16 | 65.1 KB | 2,017 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HH HH PPPPPPPP 8888888 6666666
- HH HH PP PP 88 88 66
- HH HH PP PP 88 88 66
- HHHHHHHHH PPPPPPPP 8888888 66666666
- HH HH PP 88 88 66 66
- HH HH PP 88 88 66 66
- HH HH PP 8888888 6666666
-
-
-
- KK KKK EEEEEEEE RRRRRRRR MMM MMM IIIIII TTTTTTTTTT
- KK KKK EE RR RR MMMM MMMM II TT
- KK KKK EE RR RR MM MM MM MM II TT
- KKKKK EEEEEEE RRRRRRRR MM MMM MM II TT
- KKKKKK EE RR RRR MM M MM II TT
- KK KKK EE RR RRR MM MM II TT
- KK KKK EEEEEEEE RR RRR MM MM IIIIII TT
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 1 -
-
-
-
-
-
-
-
-
-
-
- ======================
- HP86 KERMIT USER GUIDE
- ======================
- Edition 1.00
-
- This Manual applies to version 1.00
-
- CONTENTS
- --------
-
- 1. Introduction.
-
- 2. What is Kermit.
-
- 3. Running Kermit on the HP86.
- 3.1 Starting the HP86 Kermit.
- 3.2 Entering Kermit commands.
- 3.3 HP86 Kermit commands.
- 3.4 Using Kermit.
- 3.5 Finishing Kermit.
-
- 4. Communicating with another computer.
- 4.1 Setting the RS232.
- 4.2 Using the HP86 as a terminal.
- 4.2.1 The CONNECT command.
- 4.2.2 Differences between command mode and terminal mode.
- 4.2.3 Sending a break.
- 4.2.4 Returning to the HP86 Kermit.
-
- 5. Transferring files using Kermit.
- 5.1 The basic method.
- 5.2 File types.
- 5.2.1 The file type problem.
- 5.2.2 The data type problem.
- 5.3 HP86 to remote file transfer - The SEND command.
- 5.4 Remote to HP86 file transfer - The RECEIVE command.
- 5.5 Transfer problems.
- 5.6 File name conversion.
- 5.6.1 HP86 to standard conversion.
- 5.6.2 Standard to HP86 conversion.
- 5.6.3 File renaming.
-
- 6. Changing Kermit attributes.
- 6.1 The SET command.
- 6.2 The SHOW command.
- 6.3 Settable attributes.
-
- Appendix A - HP86 Kermit capabilities.
-
- Appendix B - HP86 Kermit error messages.
-
- Appendix C - Converting numeric variables.
-
-
- - 2 -
-
-
-
-
-
-
-
-
-
-
- 1. INTRODUCTION
- ===============
-
- Program: Martin Rootes, Sheffield City Polytechnic, U.K.
- Language: HP86 Basic.
- Documentation: Martin Rootes.
- Version: 1.00
- Date: April 1986
-
- This manual describes the Kermit program for the HP86 microcomputer
- produced by the Computer Services Department of Sheffield City
- Polytechnic. The implementation described is HP86 Kermit
- version 1.00. The purpose of this manual is to supply the user with
- the information necessary to enable them to transfer files from a HP86
- microcomputer to another Kermit. As transfer will almost always be to
- a different system the user will also have to read the corresponding
- guide for the other Kermit.
-
- This manual has been divided into various chapters, dealing with
- various aspects of the HP86 Kermit. For users new to Kermit Chapter 2
- describes what Kermit is, the way it works, and why it is better than
- some other methods of file transfer. Chapter 3 details the way
- HP86 Kermit is run, how to enter commands, brief descriptions of the
- commands, and how they are used. Chapter 4 deals with setting the
- HP86 Kermit up to communicate with another computer, and how to use it
- as a terminal for a mainframe. Chapter 5 gives comprehensive
- information on how to transfer files, and the problems associated with
- transfer. Following these are various chapters giving more detailed
- information on commands and some hints and tips.
-
-
- The HP86 Kermit version 1.00 is written in HP86 BASIC and needs the
- binary program UTIL/1 to be loaded to provide various extra commands,
- this program is provided with the HP86 microcomputer on the demo disk.
-
- HP86 Kermit version 1.00 was developed, written and tested on an
- Hewlett Packard HP86 microcomputer with a HP 82939A Serial interface
- and the I/O programming ROM installed. Due to being written in BASIC
- it will very probably work with the HP87 as long as the same I/O ROM
- and interface are fitted, however this has not as yet been tested.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 3 -
-
-
-
-
-
-
-
-
-
-
- 2. WHAT IS KERMIT
- ==================
-
- Kermit is a data transfer system devised by the Center for Computing
- Activities at the University of Columbia, New York (CUCCA). The
- copyright on Kermit is retained by CUCCA, however they have published
- full information on it and permit anyone to implement it on their
- machines, as long as this is not for commercial purposes. Due to this
- policy Kermit is now available for a large range of computers: There
- are implementations for nearly all mainframes and most popular
- microcomputers.
-
- The basic idea behind Kermit is to allow the transfer of any data
- between different systems, in a uniform manner, and producing a usable
- file on the receiving system. There are other methods of data transfer
- that could be used, most notably 'dumb capture', however Kermit has
- several advantages over this method.
-
- Most simple terminal emulator programs will allow some degree of
- data transfer in the form of 'dumb capture'. This is a method whereby
- as characters are received from the mainframe they are placed in a
- file, as well as being displayed on screen. The reverse process being
- to take characters from a file on the microcomputer, instead of the
- keyboard, and transmit them to the mainframe.
-
- The dumb capture method, although fast and easy to implement, has
- many problems associated with it. These are due to the RS232
- communications system used to link the computers, and the manner in
- which it is used.
-
- The first problem is caused by parity, as many mainframe systems use
- one bit of a byte for error checking, the 'parity' bit, only the lower
- 7 bits of a byte can be used to transmit data, thus only characters
- with codes between 0 and 127 will be able to be sent.
-
- Secondly communications systems commonly use certain characters as
- control characters, these can therefore not be sent as part of the
- data without causing problems, control codes lie in the range 0 to 31
- and sometimes include 127.
-
- Thirdly in a dumb capture system no error checking is performed,
- this means that the file received may not necessarily be the same as
- the file sent, due to transmission faults as well as the above
- problems.
-
-
-
-
-
-
-
-
-
-
- - 4 -
-
-
-
-
-
-
-
-
-
-
- Kermit overcomes these problems by encoding the data to be
- transferred using a standard set of rules, the Kermit 'protocol'. The
- rules have been designed to allow transmission of any character,
- regardless of any parity or control codes, with adequate error
- checking to ensure that the file received is the same as the file
- sent.
-
- The full Kermit protocol is beyond the scope of this manual, however
- the basic method will be described here to aid in the comprehension of
- following discussions, if more detail is required consult the Kermit
- protocol manual (5th edition).
-
- Kermit transfers data by dividing data up into individual packets,
- each packet containing the data itself plus some extra control
- information. This information is used by the receiving Kermit to give
- the start of packet, the sequence number of the packet, the length of
- packet, the type of packet and finally a check byte. Using this
- information the receiving Kermit can verify the data and check for
- missing packets.
-
- If a character needs to be sent whose code falls into one of the
- problem areas as mentioned above (0-32, 128-255), Kermit will convert
- it into a sequence of two 'legal' characters using prefix encoding.
- This is achieved in the following manner, if for example a control
- code needs to be sent as data it is first converted into a printable
- character, corresponding with the standard representation of these
- codes, for instance ASCII 13, usually called control M, is converted
- to the letter M. This is then prefixed with the prefix character
- (default - #), thus ASCII 13 will be sent as '#M'. A similar method is
- used to encode data with the 8th bit set using the 8th bit prefix
- (default - &).
-
- After sending a packet Kermit will wait for a packet from the
- receiving Kermit to confirm that the packet has arrived correctly,
- this is called the acknowledge packet (ACK). If for any reason the
- packet is not received correctly the receiving Kermit sends a negative
- acknowledge (NAK), this causes the sender to retransmit the last
- packet. Thus if transmission errors occur Kermit will not only detect
- the error it will try to remedy the situation by repeating the data.
-
- Although ensuring safe transmission of data this method can, without
- adequate safeguards, cause the system to become 'hung', however there
- two mechanisms employed to stop this, timeouts and the retry limit.
-
- The purpose of the timeout is to avoid the situation where the two
- Kermits are each waiting for a packet from the other, this can occur
- when a packet is lost in transmission. A timeout is basically a time
- limit on the receiving of packets, if after the limit has passed a
- packet has still not been received the Kermit will assume that the
- last one it had sent was lost and will retransmit it.
-
-
-
-
- - 5 -
-
-
-
-
-
-
-
-
-
-
- The retry limit is, as its name implies, a limit on the number of
- times that Kermit will try to retransmit a particular packet before
- giving up. This is to prevent the Kermit from endlessly sending the
- same packet to a Kermit that is either not replying, or is having
- severe transmission problems.
-
- The result of using the Kermit protocol is a simple, highly reliable
- system of data transfer, that can be, and has been, implemented on a
- wide variety of machines ranging from microcomputers to mainframes.
- The only requirements needed to transfer data from the HP86 and
- another computer are two Kermit programs, one for the HP86 and one for
- the target computer, and the existence of a RS232 serial interface
- port on both machines. The great advantage of Kermit over data
- transfer programs written for specific machines is its wide
- availability, making it possible to transfer data to many different
- machines using the same program.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 6 -
-
-
-
-
-
-
-
-
-
-
- 3. RUNNING KERMIT ON THE HP86
- =============================
-
- This section describes the general operation of the HP86 Kermit, how
- to start it and how to enter commands.
-
-
- 3.1 STARTING THE HP86 KERMIT
- ----------------------------
-
- To run Kermit on the HP86 the disk containing the Kermit program and
- the utility programs should be inserted in the disk drive (if your
- HP86 has more than one disk drive insert in drive 0). The following
- procedure should now be taken:-
-
- LOAD "Kermit" <--- Load the Kermit program.
- LOADBIN "UTIL/1" <--- Load the utility program.
- <INIT> <--- Press the INIT button.
- <RUN> <--- Press the RUN button.
-
- After about 80 secs the program will display the following prompt:-
-
- Kermit-HP86 > Enter command ?
-
- If this does not happen the RUN button should be pressed again.
-
-
- 3.2 ENTERING KERMIT COMMANDS
- ----------------------------
-
- To control the HP86 Kermit commands have to be issued to it, this is
- done by entering the desired command in the space underneath the
- Kermit prompt (note: on most implementations of Kermit the command is
- entered next to the prompt). Commands can be entered in either upper
- or lower case, and may be abbreviated to a minimum of 1 character
- (depending on command).
-
- Some of the commands will require parameters to be entered as well,
- these should be typed after the command and should be separated by at
- least one space, except for filenames which must be enclosed by quotes
- ("). The parameters can be of various types, a filename, a character,
- a numeric value, or an item from a list. In the case of the SET
- command two sets of parameters are required, firstly the item to be
- set, and secondly what it is to be set to.
-
-
-
-
-
-
-
-
-
-
- - 7 -
-
-
-
-
-
-
-
-
-
-
- The question mark (?) can be used to give useful information on
- commands, if entered as a command all the legal commands will be
- displayed, and if entered as a parameter the type of parameter will be
- displayed.
-
- send ? <- You enter.
- SEND "Source filename" <"Destination filespec"> <- Kermit replies.
- Where '<' and '>' denote an optional item.
-
- If the required parameter is an item from a list the alternatives are
- all displayed, also note that list items can be abbreviated in the
- same way as commands.
-
- set flow ? <- You enter.
- FLOW-CONTROL - NONE, XON/XOFF, DTR/RTS <- Kermit replies.
-
-
- 3.3 HP86 KERMIT COMMANDS
- ------------------------
-
- The following is a list of valid commands for the HP86 with a brief
- description of each, they will be explained in more detail in latter
- chapters.
-
- Command Parameters Description
-
- CONNECT Sets the HP86 to act as a terminal to allow
- communication with the remote host.
-
- SEND "source filename" <"dest filespec">
- Send the specified file to the remote, the
- file name that is used by the remote can also
- be specified, if required to be different from
- the source file name.
-
- RECEIVE <"dest filename">
- Receive a file, or group of files, from the
- remote, changing filename if required.
-
- SET List option Parameter
- Set specified option to a new value, used to
- change communication settings, timeouts, retry
- limit etc. Requires extra parameter(s) after
- the option.
-
- SHOW List option Displays current setting of the requested
- option, if no option is specified all the
- settable parameters will be displayed.
-
- EXIT Both these commands will cause the HP86 Kermit
- QUIT to stop, and return the HP86 to the command
- state.
-
-
- - 8 -
-
-
-
-
-
-
-
-
-
-
-
- CAT This command will produce a catalogue of the
- current disk.
-
- As well as the above commands it is also possible to use the HP86
- filing system commands in the following way:
-
- <PAUSE> <- Press the PAUSE key.
- Warning 101 at line 0 : XFR <- The HP86 gives a warning that an
- input transfer from the RS232 is
- still in progress.
-
- Any of the HP86 filing system commands can now be entered, for
- example:
-
- PURGE "GARBAGE" <- Erase the file called "GARBAGE"
-
- Once finished entering commands to the HP86 the Kermit program
- should be restarted:
-
- <CONT> <- Press the continue key
- ? <- The HP86 replies with this, the
- next Kermit command should now be
- entered under this prompt.
-
-
- 3.4 USING KERMIT
- ----------------
-
- To use Kermit to transfer data you will need a Kermit program for
- both the HP86 and the other computer, the actual procedure to be used
- depends on whether the other computer is a microcomputer with its own
- keyboard, or a minicomputer or mainframe that needs a terminal to
- communicate with it.
-
- For HP86 to microcomputer transfer the method is very simple, after
- making any connections load and run the Kermit programs in both
- computers, then using the SET command the RS232 interfaces should be
- set to appropriate values (see chapter 4). Once all the settings are
- correct transfer can begin, enter the RECEIVE command on the computer
- to which the data is to be sent, then enter the SEND command on the
- sending computer, the transfer will now take place.
-
- For HP86 to minicomputer or mainframe transfer a slightly different
- approach is needed, after physically connecting the HP86 to the
- computer the HP86 Kermit is run and any communication settings made.
- The HP86 should now be put into terminal emulator mode using the
- CONNECT command, then using the HP86 as a terminal you should log on
- to the computer and run its Kermit program. To transfer data you enter
- the required command on the remote, either SEND or RECEIVE, then
- escape back to the HP86 Kermit (using k1 - see chapter 4), and issue
- the complimentary command.
-
-
- - 9 -
-
-
-
-
-
-
-
-
-
-
- After the transfer is completed connect back to the remote, if no
- more transfers are required exit from the Kermit program, log off,
- escape back to the HP86 and exit from its Kermit program.
-
- Both these methods will be discussed in more detail in chapter 5
- 'Transferring files by Kermit'.
-
-
- 3.5 FINISHING KERMIT
- --------------------
-
- Once you have finished using Kermit for your file transfers you
- should exit from the program by using either the EXIT or the QUIT
- command, either of these will halt any RS232 transfers that are
- active, close any open files and leave the HP86 in a suitable state
- for further use. If you wish to enter a new program via the keyboard
- you should use the SCRATCH command to clear the memory, as the Kermit
- program is still present.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 10 -
-
-
-
-
-
-
-
-
-
-
- 4. COMMUNICATING WITH ANOTHER COMPUTER
- ======================================
-
- This section describes how to set up the HP86 Kermit so that it can
- communicate with another computer, the remote host. it will also
- outline how to use the terminal emulation facility when the remote is
- a mainframe computer.
-
- 4.1 SETTING THE RS232
- ---------------------
-
- Once the HP86 is physically connected to the remote (if you are
- unsure of how to do this contact your system support personnel), you
- should now set up the RS232 interface so that it can communicate with
- the remote host. There are four separate settings that may have to be
- changed these are Baud rate, parity, duplex and flow control or
- handshake (depending on duplex setting). All the changes are made
- using the SET command and the existing settings can be determined
- using the SHOW command.
-
- BAUD RATE 110, 300 Default 300
- This is the rate that the data is transmitted along the RS232 link,
- at present only two rates are allowed 110 or 300 baud.
-
- PARITY NONE, ODD, EVEN, MARK, SPACE Default MARK
- This is the parity that will be used by the RS232 interface, this
- can be none, odd, even, mark or space, if none is chosen all 8 bits of
- a byte will be sent, otherwise only the bottom 7 are used.
-
- DUPLEX FULL, HALF Default HALF
- This defines whether the remotes communication equipment can receive
- at the same time as it is transmitting, full duplex operation, or can
- only receive whilst not transmitting, half duplex. Setting this will
- also change the local echo setting, if set to full duplex local echo
- will be switched off, is set to half duplex it will be switched on,
- this can be changed with SET LOCAL-ECHO.
-
- FLOW-CONTROL NONE, XON/XOFF, DTR/RTS Default NONE
- Defines the method the remote uses to stop the HP86 transmitting any
- more data, to stop its buffers overflowing. The possible settings are
- none, XON/XOFF for software flow control using control codes 17 and 19
- (XON,XOFF), and DTR/RTS for hardware flow control using the DTR and
- RTS control lines. Setting this to any setting other than none will
- set handshake to none.
-
-
-
-
-
-
-
-
-
-
- - 11 -
-
-
-
-
-
-
-
-
-
-
- HANDSHAKE NONE, BELL, LF, CR, XON, XOFF Default XON
- Defines the character to be used as a handshake character for half
- duplex communications, the handshake character is used by both
- computers to indicate that they have finished transmitting and that
- the other can now transmit, this is sometimes called the line
- turnaround character. The possible option are none, bell (ASCII 7),
- linefeed (ASCII 10), carriage return (ASCII 13), XON (ASCII 17) and
- XOFF (ASCII 19).
-
- To change any of these settings use the SET command in the following
- manner:
-
- KERMIT-HP86 > Enter command ? <- Underneath the prompt type in set
- set flow-control xon/xoff followed by the options.
- FLOW-CONTROL - XON/XOFF <- Kermit will respond with the new
- setting if it is accepted.
- Note that the options can be abbreviated for ease of typing, for
- instance the above could have been entered as set flow xon.
-
- The settings can be determined using the SHOW command, if no option
- is specified the screen will display the settings of all the set
- options, otherwise specify the particular option:
-
- KERMIT-HP86 > Enter command ?
- show parity <- Enter command
- PARITY - MARK <- Kermit responds with the current
- setting.
-
- The actual settings needed will depend on the machine that you wish
- to communicate with, you will need to know what its settings are.
-
- If you are linking to another microcomputer you will need to set the
- RS232 options to the same on both machines. The simplest method is to
- set the options on one machine to the default settings of the other,
- depending if this can be done, for instance if the other micro has a
- default Baud rate of 1200, which can not be set on the HP, set its
- Baud rate to 300. An alternative approach is to set each option to the
- 'best' that can be set on both machines, ie the highest Baud rate,
- full duplex, hardware flow control, and no parity (to allow 8 bit data
- communication with no encoding).
-
- When connecting to a mainframe computer you will be limited to the
- standard operating on that computer, the default settings are designed
- to operate with an IBM 4341 on a 300 baud line, your Systems Support
- staff should be able to tell you what settings are needed for your
- installation.
-
-
-
-
-
-
-
-
- - 12 -
-
-
-
-
-
-
-
-
-
-
- 4.2 USING THE HP86 AS A TERMINAL
- --------------------------------
-
- As mentioned before when transferring files between the HP86 and a
- minicomputer or mainframe you will need to communicate with the remote
- by using the HP86 as a terminal, to achieve this you should use the
- CONNECT command.
-
- 4.2.1 THE CONNECT COMMAND
- -------------------------
-
- The CONNECT command needs no parameters and can be abbreviated to
- 'C', once entered the HP86 will clear the screen and display the
- following information:
-
- HP86 Kermit - Terminal emulation mode
- Function key Escape character Action
- --------------------------------------------------
- k1 C Return to Kermit
- k7 B Transmit break
- k14 Enable transmit
-
- The above display indicates the action of various function keys, and
- the corresponding escape key sequences (Ctrl-] + character). At the
- bottom of the screen a cursor will be displayed, this is where any
- keyboard input will appear.
-
- The HP86 will now act like a 'glass' teletype, characters typed on
- the keyboard will be sent directly to the remote via the RS232
- interface, and characters received from the RS232 will be displayed on
- the screen.
-
- 4.2.2 DIFFERENCES BETWEEN COMMAND MODE AND TERMINAL MODE
- --------------------------------------------------------
-
- There are important differences in the way the keyboard and screen
- are handled in the terminal mode compared to the normal HP86 entry
- mode, these are as follows.
-
- All of the special keys, cursor keys and screen control keys cease
- to have any effect, except for the ENTER key, RESET key, and the
- defined function keys. Pressing the ENTER key sends a carriage return
- (Control M) to the remote, in addition if a handshake character is
- specified it will also be sent and the transmitter will be disabled.
- The RESET key performs its normal function of halting the program and
- resetting interfaces.
-
-
-
-
-
-
-
-
- - 13 -
-
-
-
-
-
-
-
-
-
-
- The delete key may not have any effect, depending on the remote
- system, even if accepted the action on the screen will differ, instead
- of the last character typed being removed from the screen, a delete
- character will be displayed after it. Some remotes will use a
- different key for this purpose, for instance the IBM uses '_' as a
- delete character, you will be able to find this from the user
- documention on using terminals.
-
- If there is any handshake or flow control specified there will be
- times when the keyboard does not respond due to the transmitter being
- disabled, with half duplex systems this will occur immediately after
- pressing the enter key and will remain until the remote finishes
- transmitting data and sends the handshake character. If the keyboard
- is not responding and the remote is not transmitting, or about to
- transmit, the transmitter can be re-enabled by pressing function key
- 14.
-
- 4.2.3 SENDING A BREAK
- ---------------------
-
- Many mainframe computers may need to be sent a 'Break' signal for
- certain reasons, usually to interrupt the current program and return
- to the command state. You can send a break from the HP86 Kermit either
- by pressing function key 7, or by typing control ] followed by B.
-
- 4.2.4 RETURNING TO THE HP86 KERMIT
- ----------------------------------
-
- When you have finished issuing the required commands to the remote
- Kermit or you have finished your session on the remote, you will need
- to return to the HP86 Kermit's command mode, this is achieved using
- function key 1, or control ] plus 'C'. On returning the screen will be
- cleared and the standard Kermit prompt will be displayed. If you are
- unsure what mode you are in examine the prompt, if it is not
- 'KERMIT-HP86 > Enter command ?' then you are in terminal mode.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 14 -
-
-
-
-
-
-
-
-
-
-
- 5 TRANFERRING FILES USING KERMIT
- ================================
-
- The main purpose of the HP86 Kermit is to enable file transfer
- between the HP86 and another computer, the remote host. The basic
- method will not vary from one system to another as this is defined in
- the Kermit protocol, however certain details will be different.
- Before attempting any file transfer you should consult the user guide
- for the remote system to familiarise yourself with any differences.
- This section describes in detail how to transfer files between the
- HP86 and the remote computer.
-
-
- 5.1 THE BASIC METHOD
- --------------------
-
- To transfer files using Kermit you will need another Kermit program
- running in the remote host, and you will need to issue commands to it.
- For HP86 to microcomputer transfers this can be done simply by typing
- the required commands on the respective keyboards, however for HP86 to
- mainframes or minicomputers a more complex approach is needed.
-
- 1. Load and run the HP86 Kermit, change any RS232 settings to enable
- the HP86 to communicate with the remote, and set any other
- parameters needed for the transfer.
-
- 2. The HP86 is put into terminal mode using the CONNECT command. Now
- with the HP86 acting as a terminal the user should log on to the
- mainframe in the normal manner.
-
- 3. The Kermit program on the remote should now be run, and any SET
- commands entered.
-
- 4. To transfer files the relevant command should now be entered,
- RECEIVE for HP86 to remote, SEND for remote to HP86. After
- entering the command return to HP86 Kermit command mode using k1
- and enter the complimentary Kermit command, SEND for HP86 to
- remote, RECEIVE for remote to HP86.
-
- 5. After the transfer is complete re-enter terminal mode to set the
- remote's Kermit for any further transfer, or if you have finished
- all your transfers you should log out from the remote.
-
- The above description is only a guide to the sequence of actions to
- be taken, you may not need to set any parameters, or you may wish to
- run some other program on the remote using data transferred by Kermit.
-
-
-
-
-
-
-
-
- - 15 -
-
-
-
-
-
-
-
-
-
-
- 5.2 FILE TYPES
- --------------
-
- Before any discussion of file transfer it is necessary to outline
- the types of files that can successfully be transferred with
- HP86 Kermit version 1.00. Due to version 1.00 being written in
- HP86 BASIC the ideal of being able to transfer any file cannot be
- implemented. The restrictions imposed by HP86 BASIC are quite severe
- and can only be overcome by various forms of file conversion. Because
- of the limitations it is advisable to thoroughly read this section
- before attempting any file transfer.
-
- 5.2.1 THE FILE TYPE PROBLEM
- ---------------------------
-
- When a file is created by the HP86 it is assigned a particular type
- depending on its use and method of generation, these are as follows:-
-
- PROG - BASIC program created using the STORE command.
- BPGM - Binary program.
- DATA - Data file.
- GRAF - Screen dump.
- **** - Extended file.
-
- Of these only those of type DATA can be sent using version 1.00 of
- Kermit, this being the only type that can be accessed by HP86 BASIC.
- Fortunately a utility program 'GETSAVE' exists on the HP86 demo disk
- which will save BASIC programs from memory as DATA files, and load
- DATA files as BASIC programs (or sections of programs).
-
- The file type can be discovered using the CAT command either before
- running Kermit or whilst in the command mode.
-
- KERMIT-HP86 > ?
- cat <- Enter catalogue command
- .. HP replies with
- Name Type Bytes Recs
- ------------------------------
- MYFILE DATA 256 4
- PROGRAM PROG 256 9
- UTILITY BPGM 256 7
-
- If the type displayed is not DATA then the file cannot be
- transferred using HP86 Kermit version 1.00, if this is attempted
- Kermit will return with an error.
-
-
-
-
-
-
-
-
-
- - 16 -
-
-
-
-
-
-
-
-
-
-
- 5.2.2 THE DATA TYPE PROBLEM
- ---------------------------
-
- As previously mentioned only files of type DATA can be sent via the
- present implementation of Kermit, however there is a second factor
- that can affect the success of any transfer, that of data types.
- The HP86 like many other microcomputers stores data on its disks in
- two different formats depending on the variable type, either numeric
- or string data. This causes problems when sending data to a remote
- kermit for the following reasons:
-
- All data to be transferred via Kermit has to be either ASCII data,
- or binary data that can be converted to ASCII by 8-bit prefixing.
-
- HP86 BASIC is unable to access data on disk as bytes, it must be
- read either as a string variable or as a numeric variable.
-
- Therefore if data in the numeric format is encountered it has to be
- converted into ASCII before it can be sent. There is a mechanism to do
- this in the HP86 Kermit program, however this method is not
- satisfactory for most transfers for the following reasons:
-
- The numeric variable will be converted to a string of characters,
- the number of which depends only on the number of significant digits
- in the variable (for instance '1 ','10 ' and '10.04 '). The resulting
- file will therefore have a irregular format that will make its use, by
- other computer systems or languages, very difficult.
-
- There is no method in the Kermit program of converting this data
- back into numeric variables, therefore a file sent using this
- conversion and then received back will be of a different format and
- almost definitely unusable.
-
- For these reasons it is advisable to convert any files to be sent by
- kermit so that any numeric variables are stored as, or in, ASCII
- strings. You should attempt to do this so the numbers are stored in a
- fixed format based on their range, this will enable the data to be
- reconverted easily, and allow it to be used as input to programs
- written in other languages, or on different computers.
-
- For example if the data was a list of temperatures between 0 and 200
- measured with and accuracy of 2 decimal places, a sensible choice of
- format would be XDDD.DD (where D is a digit or space if a leading
- zero, X is a space), 10 of these numbers could then be placed in one
- string, producing records with the following format:
-
- 12.15 54.72 112.39 23.54 178.01 107.10 93.42 121.34 154.81 133.04
-
- This would produce a file that could be used by many high level
- languages, for instance it could be read by a FORTRAN program using
- the following format statement - FORMAT (10(1X,F6.2)).
-
-
-
- - 17 -
-
-
-
-
-
-
-
-
-
-
- For a simple method of storing numeric data as formatted strings see
- appendix C.
- Please note that there is no way that you can determine whether a
- file contains data of the correct type until you actually attempt to
- transfer it. The default condition for the HP86 Kermit is to do no
- conversion of numeric data, if a numeric variable is encountered then
- the transfer will be halted and an error message displayed. To use the
- inbuilt conversion facility issue the following command:
-
- SET SEND-CONVERT ON
-
- It must be emphasized again that using this method produces
- unpredictable results, also in some circumstances an type error can
- still be produced. For these reasons it is suggested that it should
- be used vary rarely, for files containing only a small proportion of
- non crucial numeric data.
-
-
- 5.3 HP86 TO REMOTE FILE TRANSFER - THE SEND COMMAND
- ---------------------------------------------------
-
- To send a file from the HP86 to the remote Kermit you use the SEND
- command, however before you issue this command you should set the
- remote in to receiving state. To set the remote up to receive a file
- you use the RECEIVE command, the manner in which this is done depends
- on the type of remote.
-
- If the remote is a microcomputer simply enter RECEIVE using its
- keyboard then enter the SEND command using the HP86's keyboard.
-
- For a mainframe or minicomputer remote host you will have needed to
- have logged on and started Kermit using terminal mode. While still in
- terminal mode issue the RECEIVE command. You should now return to the
- HP86 Kermit command mode by using function key 1 and enter the
- HP86 Kermit SEND command.
-
- Once the remote is in a state to receive files you should enter the
- SEND command, this has the following format:
-
- SEND "source filename" <"dest filespec">
-
- Where:
-
- "source filename" Is the name of the file to be sent in standard
- HP86 format.
-
- "dest filespec" Is the name that you wish the file to be stored
- as on the remote computer.
-
- If only the source filename is specified the HP86 Kermit will send
- this name converted into a 'legal' Kermit format.
-
-
-
- - 18 -
-
-
-
-
-
-
-
-
-
-
- The HP86 will now start to send the named file to the remote Kermit
- the following screen display will be seen:
-
- ----------------------------------------------------------------
- I HP86 Kermit sending file I
- I ------------------------ I
- I I
- I Sending 'myfile dat' as 'MYFILE.DAT' I
- I I
- I Current action : Sending initialise Retries : 0 I
- I Packets sent : 0 NAKs received : 0 I
- I Bytes sent : 0k Timeouts : 0 I
- I Bad packets : 0 I
- I I
-
- The file will now be sent packet by packet to the remote Kermit.
- The progress of the transfer will be displayed on the screen. When
- completed the message 'Transfer successful' will be displayed and you
- will be returned to command mode.
-
-
- 5.4 REMOTE TO HP86 TRANSFER - THE RECEIVE COMMAND
- -------------------------------------------------
-
- Before discussing the method used to transfer files from the remote
- to the HP86 a serious problem needs to be highlighted. Unlike most
- filing systems the HP86 BASIC filing system is incapable of creating a
- file without knowing its size. Unfortunately there is no way for the
- HP86 Kermit to know the size of the file it is receiving. Due to this
- problem it is necessary to inform the HP86 Kermit of the size of the
- file that it is to receive, to do this use the SET FILE-SIZE command.
-
- SET FILE-SIZE size
-
- Where size is the desired file size in kilobytes, the default
- setting is 10.
-
- If FILE-SIZE is not set correctly one of two problems can arise.
- Firstly if FILE-SIZE is set far larger than the actual size you will
- be wasting disk space. Secondly and more seriously if FILE-SIZE is
- smaller than the actual size then the transfer will be aborted when
- the file on the HP86's disk becomes full.
-
- To avoid both problems before receiving files find the actual file
- size by using the relevant command on the remote system, you can find
- this from the user documentation. You may have to calculate the size
- in kilobytes from the record size and number of records, round this
- figure up to the nearest kilobyte. Setting FILE-SIZE to this value
- will usually be sufficient. Occasionally though this can be less than
- actually needed as the HP86 requires an extra 3 bytes per record
- stored, so for added safety when transferring large files increase the
- file size by 1.
-
-
- - 19 -
-
-
-
-
-
-
-
-
-
-
-
- As you would expect, to receive files from the remote you use the
- RECEIVE command on the HP86 Kermit and the SEND command on the remote.
- The order the two commands are entered will depend again on the type
- of remote.
-
- For microcomputer to HP86 transfer: Issue the RECEIVE command on the
- HP86, then the SEND command on the remote.
-
- For transfer from mainframe or minicomputer: First issue the SEND
- command to the remote whilst in terminal mode, then return to HP86
- command mode, and enter RECEIVE.
-
- The RECEIVE command has the following format:
-
- RECEIVE <"dest filename">
-
- Where "dest filename" is the file name that the received file will
- be stored as, if not supplied the name sent by the remote Kermit will
- be converted to a legal HP86 name.
-
- Once entered the HP86 screen will clear and the following will be
- displayed:
-
- ----------------------------------------------------------------
- I HP86 Kermit receiving file I
- I -------------------------- I
- I I
- * I I
- I I
- I Current action : Wait for initialise Retries : 0 I
- I Packets received : 0 NAKs sent : 0 I
- I Bytes received : 0k Timeouts : 0 I
- I Bad packets : 0 I
- I I
-
- * Note the name of the file being received will not be displayed
- until that information has been received from the remote.
-
- When the HP86 Kermit receives the file header it will attempt to
- create a file with either the name supplied after the RECEIVE command,
- or with the name contained in the header (converted to HP86 form). If
- the file already exists on the disk then Kermit will rename the file
- and attempt to store it again, the new name will be displayed.
-
- Receiving 'MYFILE.DATA' as 'MYFI00 DAT'
-
- The actual way the file is renamed depends on whether the name was
- supplied as a parameter to the RECEIVE command, or contained in the
- file header, see the section on file name conversion for more details.
-
-
-
-
- - 20 -
-
-
-
-
-
-
-
-
-
-
- 5.5 TRANSFER PROBLEMS
- ---------------------
-
- After the transfer has completed the HP86 Kermit will display the
- 'Transfer successful' message, however if an error has occured and the
- transfer has been halted a suitable message will be displayed.
-
- Timeout - Time limit exceeded on sending or receiving a
- packet, increase timeout and re-run.
- NAK received - A negative acknowledge packet was received from
- the remote that caused the retry limit to be
- exceeded.
- Checksum error - A garbled packet was received from the remote.
- Check communication settings and physical
- connections.
- Incorrect packet - The remote Kermit has sent a packet which is not
- the type that the HP86 expects. This should only
- happen if both Kermits have been set to SEND
- files, try again being careful to enter the
- correct commands.
- Error message from remote
- - The remote Kermit has sent an error packet the
- contents of which will be displayed.
- Transfer aborted - Function key 1 was pressed during transfer.
- Other messages - The rest of the messages generated by Kermit will
- be errors produced by the filing system for
- instance 'File does not exist', these are mostly
- self explanatory, however the error no is
- displayed so users can check the HP86 manual for
- more detailed descriptions (see also Appendix B).
-
- Sometimes on connecting back to remote, especially after an error,
- garbage is printed on the screen. This indicates that the remote
- Kermit is still in receive or send mode, having missed the relevant
- error or break packet. To rectify this situation press the enter key
- until the remotes prompt reappears.
-
-
- 5.6 FILE NAME CONVERSION
- ------------------------
-
- The Kermit protocol specifies that the file name of the file being
- sent should be transmitted in the file header packet, to provide the
- receiving Kermit with a name to store the file under. However the file
- name has first to be converted to a standard format, although
- different from the HP86 format it is very similar to many mainframe
- file specifications being of the following form:
-
- filename.filetype
-
- where filename and filetype can be of any length but can only be
- composed of digits or uppercase letters.
-
-
- - 21 -
-
-
-
-
-
-
-
-
-
-
- HP86 file specifications are of the form "XXXXXXXXXX",
- or "XXXXXXXXXX.volume",
- or "XXXXXXXXXX:msus", where
-
- XXXXXXXXXX is a filename of up to 10 characters.
-
- volume is the volume label of the disk containing XXXXXXXXXX.
-
- msus is the device specifier of the disk drive containing
- XXXXXXXXX (E.G. D700).
-
- HP86 file names may contain upper or lower case letters, digits,
- special characters, excluding period and colon, and imbedded spaces.
- Upper and lower case letters are not equivalent.
-
- Due the differences in the format of filenames it is necessary to
- convert names used on the HP86 if they are to be sent to the remote,
- and likewise convert names received from the remote if they are to be
- used on the HP86.
-
- 5.6.1 HP86 to standard conversion
- ---------------------------------
-
- When sending a file to the remote and a destination file name has
- not been specified the HP86 Kermit will convert the source filename
- into a 'legal' Kermit name.
- The way this conversion takes place is as follows: All lowercase
- characters are converted to uppercase. If the name contains one or
- more spaces then the first space will be converted to '.', else if
- name contains one or more '_' characters then the first '_' will be
- changed to '.'. The name is now scanned for legal characters (0-9,A-Z
- & first '.') if any illegal character is found it will be removed from
- the name. If the resulting name contains no '.' the filetype '.DATA'
- will be added to the end.
-
- For example
-
- Statistics would be converted to STATISTICS.DATA
- TEST FILE '' '' '' '' TEST.FILE
- Tst File 1 '' '' '' '' TST.FILE1
- TEST#1-00 '' '' '' '' TEST100.DATA
-
- The name that Kermit sends to the remote will be displayed on the
- screen along with the source file name.
-
-
-
-
-
-
-
-
-
-
- - 22 -
-
-
-
-
-
-
-
-
-
-
- 5.6.2 Standard to HP86 conversion
- ---------------------------------
-
- When receiving files without specifying a destination file name then
- a reverse conversion occurs. First the name is scanned for the '.'
- marker, if this does not exist then the name is used as it is. The
- HP86 name is then constructed using the first 6 characters of the
- filename, a space and then the first 3 characters of the filetype.
- Thus:
-
- STATISTICS.DATA would be converted to STATIS DAT
- TEST.FILE '' '' '' '' TEST FIL
-
- Note that a filename converted to Kermit format and then converted
- back will not necessarily be the same.
-
- 5.6.3 File renaming
- -------------------
-
- When receiving files from the remote the situation can arise that
- the file name supplied, or the converted file name from the remote
- will clash with a file already on the disk drive. To avoid losing data
- by overwriting the existing file the HP86 Kermit will attempt to
- rename the file. The method used for renaming depends on whether the
- name was supplied as a parameter for the RECEIVE command, or converted
- from the file header sent by the remote.
-
- For a supplied name the method is to add a two digit number to the
- end, keeping the total length to 10 characters, this may involve
- writing over the last two characters. The numbering will start from
- 00 and will continue until 99 after which an error message will be
- generated.
-
- For example:-
- MYFILE would be renamed MYFILE00
- STATISTICS '' '' '' STATISTI00
- If MYFILE & MYFILE00 existed then
- MYFILE would be renamed MYFILE01
-
- If the file name is one that has been received and converted from
- the file header packet then the renumbering is done at the end of the
- part that was the filename, keeping it to 6 characters or less.
-
- For example
- MYFILE.DATA is converted to MYFILE DAT and renamed MYFI00 DAT
- TEST.BASIC '' '' '' TEST BAS '' '' TEST00 BAS
-
- The result of either of these methods will be displayed on the
- screen, however the results should not be too radically different from
- the original to enable correct identification.
-
-
-
-
- - 23 -
-
-
-
-
-
-
-
-
-
-
- 6. CHANGING KERMIT ATTRIBUTES
- =============================
-
- At various points throughout this manual it has been mentioned that
- certain attributes have needed to be changed, the specific cases being
- described. This chapter gives a more detailed description of the
- command used to change these attributes, the SET command.
-
-
- 6.1 THE SET COMMAND
- -------------------
-
- The SET command has the following format:
-
- SET option parameter(s)
-
- Where
- option The attribute that you wish to change.
- parameter(s) The value(s) to set the option to.
-
- The parameter types will depend on the option specified, and can be
- a character, a numeric value, or an item from a list. The option name
- can be abbreviated, as can the parameter if it is a list item. Kermit
- will respond with the new setting or with an error message if an
- illegal value is entered.
-
- SET RETRY 7 <- Enter set command
- RETRY - 7 <- Kermit replies
-
- SET RETRY # <- Set command with incorrect value.
- Illegal value - # <- Kermit replies.
-
- If a question mark is entered instead of the parameter then Kermit
- will display either the expected parameter type, numeric or character,
- or display the list from which the parameter should be chosen.
-
- SET RETRY ? <- Set command query.
- Numeric value <- Kermit replies
-
- SET FLOW ? <- Set command query.
- FLOW-CONTROL - NONE, XON/XOFF, DTR/RTS <- Kermit replies.
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 24 -
-
-
-
-
-
-
-
-
-
-
- 6.2 THE SHOW COMMAND
- --------------------
-
- This command is used to display the current settings of the
- attributes, if entered with no option then all settable attributes
- will be displayed, otherwise the setting of the specified option is
- shown.
-
- SHOW DEBUG <- You enter.
- DEBUG - OFF <- Kermit responds.
-
-
- 6.3 SETTABLE ATTRIBUTES
- -----------------------
-
- There now follows a list of the attributes that can be set and
- displayed using the SET and SHOW commands.
-
- OPTION PARAMETER TYPE DEFAULT
-
- TIMEOUT Numeric value Default - 10 secs
- The length of time the HP86 Kermit will wait for a
- packet from the remote before causing a timeout.
-
- RETRIES Numeric value Default - 10 retries
- The number of times the HP86 Kermit will try to resend
- a packet.
-
- SEND-CONVERT OFF, ON Default - OFF
- Defines whether numeric variables are to be converted
- and sent as string data, if off numeric variables will
- cause the transfer to abort.
-
- DEBUG OFF, ON Default - OFF
- If set to on then packets sent and received will be
- displayed on the screen.
-
- PREFIX Character Default - #
- Defines the character to be used for prefix encoding.
-
- END-OF-LINE Numeric value Default - 13
- The ASCII value of the end of line character that
- should be sent after each packet.
-
- RECORD-END Numeric value(s) Default - 13 10
- Defines the sequence of control characters that
- indicate the end of a record. This will be added to
- strings when sending files, searched for and removed
- when receiving files.
-
- FILE-SIZE Numeric value Default - 10
-
-
-
- - 25 -
-
-
-
-
-
-
-
-
-
-
- The size of the file (kilobytes) that will be created
- when receiving files.
-
- RECORD-LENGTH Numeric value Default - 256
- The record length that will be used by the HP86 when
- creating files, if matching record lengths on remote
- systems add 3 bytes, the HP86 needs these extra bytes
- when storing strings.
-
- NO-OF-RECORDS Numeric value Default - 40
- The number of records of the file created by the
- RECEIVE command, setting this will override the
- file-size, the resulting size being the record length
- times the no of records, setting file-size will change
- this value.
-
- DUPLEX FULL, HALF Default - HALF
- The duplex setting of the remote, setting this value
- alters the setting of the local echo, FULL - OFF, HALF
- - ON.
-
- LOCAL-ECHO OFF, ON Default - ON
- Defines whether characters typed on the keyboard will
- be displayed on the screen (ON), this only applies to
- terminal mode.
-
- FLOW-CONTROL NONE, XON/XOFF, DTR/RTS Default - NONE
- Specifies the flow control method to be employed,
- setting this to any value other than NONE sets
- HANDSHAKE to NONE.
-
- HANDSHAKE NONE, BELL, LF, CR, XON, XOFF Default - XON
- Defines the handshake character to be used for line
- turnaround, setting this to anything except NONE will
- set FLOW-CONTROL to NONE.
-
- PARITY NONE, ODD, EVEN, MARK, SPACE Default - MARK
- The parity to be used by the RS232 interface.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 26 -
-
-
-
-
-
-
-
-
-
-
- Appendix A : HP86 KERMIT Capabilities
- =====================================
-
-
- The following is a list of Kermit capabilities, with information as
- to whether they are supported by HP86 Kermit version 1.00.
-
- Local operation: Yes
- Remote operation: No
- Transfers text files: Yes
- Transfers binary files: No
- Wildcard send: No
- ^X/^Z interruption: Yes
- Filename collision avoidance: Yes
- Can time out: Yes
- 8th-bit prefixing: No
- Repeat count prefixing: No
- Alternate block checks: No
- Terminal emulation: Yes
- Communication settings: Yes; duplex, parity, handshake,
- flow control
- Transmit BREAK: Yes
- IBM communication: Yes; default settings
- Transaction logging: No
- Session logging (raw download): No
- Raw upload: No
- Act as server: No
- Talk to server: No
- Advanced commands for servers: No
- Local file management: Yes; CAT
- Handle file attributes: No
- Command/init files: No
- Printer control: No
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 27 -
-
-
-
-
-
-
-
-
-
-
- Appendix B : HP86 error messages
- ================================
-
-
- The following is a list of error messages that Kermit version 1.00
- will give if a transfer is aborted.
-
- Timeout receiving The HP86 has timed out whilst waiting for a packet
- from the remote.
-
- NAK received The remote has sent a NAK causing the retry limit
- to be exceeded.
-
- Checksum error The last packet received was garbled.
-
- Incorrect packet The wrong packet type has been received from the
- remote.
-
- Timeout sending The HP86 has timed out whilst trying to send a
- packet.
-
- Cannot rename file The file being received has the same name as an
- existing file, but it cannot be renamed as the
- number suffix is past 99.
-
- Disc write protected
- The disk has a write protect label attached, the
- file cannot be stored.
-
- File does not exist The file cannot be found on the disk.
-
- Incorrect file type The file cannot be sent as the file type is not
- DATA.
-
- Read error There has been a read error on the disk.
-
- Record does not exist
- The file has become full before all the data has
- been received.
-
- No M.S. device No mass storage device has been specified.
-
- Directory full No more files can be stored on the disk as the
- directory has become full.
-
- Volume not found The specified volume name can not be found.
-
- MSUS not found The specified mass storage device (disk drive) can
- not be found.
-
- Read verify error The data written to disk has been corrupted.
-
-
-
- - 28 -
-
-
-
-
-
-
-
-
-
-
- Disc full The disk has become full, or does not contain
- enough space to create a new file.
-
- Medium damaged The disk is faulty.
-
- Disc drive fault The disc drive is not functioning correctly, can
- be caused by leaving the latch on the disc drive
- up.
-
- Data type error The variable just read was a numeric variable and
- the data conversion facility is off.
-
- Transfer aborted Function key 7 was pressed aborting the transfer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 29 -
-
-
-
-
-
-
-
-
-
-
- Appendix C : Converting numeric variables
- =========================================
-
-
- As mentioned in the section on file transfer numeric variables
- cannot be sent to the remote without conversion. Although a very basic
- conversion method is included as part of the HP86 Kermit, it is
- advisable not to use it but to convert the whole file into one usable
- by Kermit and the remote.
-
- To convert the file you will need to know the manner in which the
- data is arranged in the source file, and decide on a format for the
- converted file. The structure of the source file can usually be
- determined by examining the program that created it, with a well
- documented program this task should be fairly easy. However if the
- creating program is not available, and the structure is unknown, use
- the HP86 BASIC TYP command.
-
- Once you have determined the structure of the file(s), and have
- decided on a logical format to convert them to, you will need to write
- a short program to achieve this. The easiest way of converting the
- numbers into a useful format is to use a facility provided by the
- HP86 I/O ROM. The method involves defining a dummy I/O buffer, output
- the numeric variable to this buffer using the formatting facilities
- (USING), and reading it back in as a string with the ENTER command.
-
- For example
-
- 10 DIM dummy$"88" <- Dimension variable to 8 bytes more than
- required size.
- 20 IOBUFFER dummy$ <- Set it up as an I/O buffer
- .
- .
- .
- 500 OUTPUT dummy$ USING "X,M4D.DD"; N <- Output number using the
- specified format.
- 510 ENTER dummy$ USING "K" ; N$ <- Read it in as a string.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 30 -
-
-
-
-
-
-
-
-
-
-
- After converting the number to a string it can either be stored
- separately, or placed into another string along with others to form a
- record. The OUTPUT command can be used to construct records by
- outputting more than one variable at once, or by outputting without
- end of line.
-
- 500 OUTPUT dummy$ USING "XM4D.DD" ; N1,N2,N3,N4
-
- or
- 500 FOR I=1 TO 10
- 510 OUTPUT dummy$ USING "#,X,M4D.DD" ; N(I) <- Output without EOL
- 520 NEXT I
- .
- . As there is now no EOL sequence at the end of the buffer the
- . following statement would be needed to read this back.
- .
- 530 ENTER dummy$ USING "#,#K" ; R$ <- Enter without EOL
-
- The complete record string can now be written to the disk file.
-
- As can be seen this is a very simple method of producing formatted
- files which can be sent using the HP86 Kermit. Also with a bit of care
- these files could be used as input to programs written in other
- languages than BASIC. The reverse conversion is also easy to perform
- using the ENTER command:
-
- 500 OUTPUT dummy$ ; R$ <- Output the string to the dummy buffer
- 510 FOR I=1 T0 10
- 520 ENTER dummy$ USING "#,X,M4D.DD" ; N(I) <- Get number
- 530 NEXT I
-
- All the above conversion techniques can of course be included in
- other programs, if it is invisaged that the data files produced by the
- program will be transferred to another system using Kermit. Including
- an option to produce files in 'Kermit' format is more efficient than
- having separate conversion programs.
-
- The above discussion does not include any details of image
- specifiers and other related matters, if you wish to use this method
- of data conversion you are strongly advised to read the section on
- Formatted I/O operations in the HP86 I/O Programming guide.
-
-
-
-
-
-
-
-
-
-
-
-
-
- - 31 -
-